package database

import (
	"github.com/gofiber/fiber/v2/log"
	"github.com/kadycui/fiber-ci/model"
)

func Migration() {
	err := DB.AutoMigrate(
		//&model.User{},
		//&model.Book{},
		//&model.Product{},
		&model.Su{},
		&model.Channel{},
		&model.Group{},
		&model.Lu{},
		&model.DefDict{},
		&model.GroupsServer{},
		&model.GroupsChannel{},
		&model.ChannelServer{},
	)
	if err != nil {
		return
	}

	log.Info("mysql数据迁移成功!")
}
